<?php
	$page = $_GET['p'];

	session_start();
	if(!isset($_SESSION['user'])){header("Location: http://gdecastro2.cuttingedgespace.com/DirectOrder/");}

	// Setting the page title
	$title = 'DirectOrder';
	if ($page == 'menu')	{
		$title .= ' - Menu';
	}
	else{
		$page = 'tables';
		$title .= ' - Tables';
}
?>
<!DOCTYPE html>
<html>
<head>
	<title>
		<?php echo $title ?>
	</title>
	<?php include("../styles/head_links.php"); ?>
	<script type='text/javascript' href='../scripts/script.js'></script>

	<meta charset='UTF-8'>
	<?php 
	//	(2)
	if ($page == 'menu')	include ('fragments/menu_head.php');
	else 					include('fragments/tables_head.php');	
	?>
</head>
<body>
	<div id="logo">
		<h1>
			DirectOrder
		</h1>
	</div>
	<div id='main_container'>
		<?php include('fragments/header.php'); /*including the header of the page (the little menu on the top) */ ?>
		<div id='content'>
		<!-- 
		Where the contents are going to be loaded from the correct file (contas.php or menu.php) 
		via ajax (see the <script> section inside the files in heads folder) 
	-->
	<?php
		if ($page == 'menu')	include ('menu.php');
		else	include('tables.php');	
?>
</div>
</div>
</body>
</html>